package nbcp.db.mongo.repository.sys

import nbcp.base.extend.*
import nbcp.db.mongo.entity.*;
import nbcp.db.mongo.mor
import nbcp.db.mongo.*
import nbcp.db.mongo.*
import nbcp.db.mongo.table.*
/**
 * Created by nbcp on 2017/3/23.
 */
//interface  SysCityRepository: MongoRepository<SysCity, ObjectId> {
//}
fun  SystemGroup.SysCityEntity.FindByCode(code:Int): SysCity?{
    if( code == 0)
    {
        return null;
    }
    return mor.system.sysCity.query("code" match code).toEntity()
}